package pack.model;

import java.awt.Color;

import pack.help.RobotCommand;
import pack.help.realRobot.Motor;
import pack.help.realRobot.Wheel;
import pack.help.realRobot.uC.UC;

public class RealRobot extends Robot{

	UC uC;
	Motor motorL;
	Motor motorR;
	Wheel wheelL;
	Wheel wheelR;
	
	public RealRobot(Color c) {
		super(c, "RealRobot", null);
		
		wheelL = new Wheel();
		wheelR = new Wheel();
		
		motorL = new Motor(wheelL);
		motorR = new Motor(wheelR);
		
		uC = new UC(motorL,motorR);
	}
	
	public void runCmd(RobotCommand cmd){
		
		uC.runCmd(cmd);
		
	}
	
	public boolean pingCmd(){
		return uC.pingCmd() == UC.Flag.READY;
	}
	
	public void stopCmd(){
		uC.stopCmd();
	}

}
